package com.xiaoyu.lanling.feature.invite.model

import `in`.srain.cube.request.JsonData
import `in`.srain.cube.views.list.ListItemTypedBase
import com.xiaoyu.base.model.User
import com.xiaoyu.base.utils.extensions.dp
import com.xiaoyu.lanling.media.image.UserImageLoadParam

class InviteItem(jsonData: JsonData) : ListItemTypedBase {
    val user = User.fromJson(jsonData.optJson("user"))
    val time = jsonData.optString("inviteTime")
    val loadParam = UserImageLoadParam.newBuilder().setUserAndDP(user, 32).setCornersRadius(16.dp)?.build()
    override fun getViewType(): Int {
        return 0
    }
}